The useCancelOrder hook allows users to cancel a listing of an NFT that is currently for sale on the Marketplace. It handles the cancellation process and transaction execution.
Copy
Ask AI
import { useCancelOrder } from '@0xsequence/marketplace-sdk/react';## Into your React component:const { cancelOrder } = useCancelOrder({ chainId, collectionAddress});const onClickCancel = () => { cancelOrder({ marketplace, orderId, });};return <button onClick={onClickCancel}>Cancel Order</button>;